

            function addArduinoCod (Blockly) {
            
                        
                        
                        
                        
                Blockly.Arduino['EXT_NRF24_BLOCK_1609322024509'] = function(block)
                {
                    let item =  Blockly.Arduino.valueToCode(this, 'item', Blockly.Arduino.ORDER_ATOMIC);
                    console.log("=======item======: ", item);
                    let item1 = item.replace(/'/g, '');
                  
                    Blockly.Arduino.definitions_['include_EXT_NRF24_BLOCK_1609322024509'] = ``;
                    Blockly.Arduino.definitions_['define_EXT_NRF24_BLOCK_1609322024509'] = ``;
                    Blockly.Arduino.definitions_['setup_EXT_NRF24_BLOCK_1609322024509'] = ``;
                    console.log("=======item1111======: ", item1);
                     return  [item1];
                }                        
                        
                        
                        
                        
                        
                        

                        
        Blockly.Arduino['EXT_NRF24_BLOCK_1609318842434'] = function(block)
        {
            let number =  Blockly.Arduino.valueToCode(this, 'number', Blockly.Arduino.ORDER_ATOMIC);
          
            Blockly.Arduino.definitions_['include_EXT_NRF24_BLOCK_1609318842434'] = `\n#include "RF24.h"`;
            Blockly.Arduino.definitions_['define_EXT_NRF24_BLOCK_1609318842434'] = ``;
            Blockly.Arduino.definitions_['setup_EXT_NRF24_BLOCK_1609318842434'] = `radio.begin();\r\n  radio.openWritingPipe(${number});`;
             return  `\r\n`;
        }
                    

                        
        Blockly.Arduino['EXT_NRF24_BLOCK_1609319094810'] = function(block)
        {
            let Power = this.getFieldValue('Power');
          
            Blockly.Arduino.definitions_['include_EXT_NRF24_BLOCK_1609319094810'] = ``;
            Blockly.Arduino.definitions_['define_EXT_NRF24_BLOCK_1609319094810'] = ``;
            Blockly.Arduino.definitions_['setup_EXT_NRF24_BLOCK_1609319094810'] = `radio.setPALevel(RF24_PA_${Power});`;
             return  `\r\n`;
        }
                    

                        
        Blockly.Arduino['EXT_NRF24_BLOCK_1609319376367'] = function(block)
        {
            let ce = this.getFieldValue('ce');
let cs = this.getFieldValue('cs');
          
            Blockly.Arduino.definitions_['include_EXT_NRF24_BLOCK_1609319376367'] = ``;
            Blockly.Arduino.definitions_['define_EXT_NRF24_BLOCK_1609319376367'] = `RF24 radio(${ce},${cs});`;
            Blockly.Arduino.definitions_['setup_EXT_NRF24_BLOCK_1609319376367'] = ``;
             return  `\r\n`;
        }
                    

                        
        Blockly.Arduino['EXT_NRF24_BLOCK_1609320679915'] = function(block)
        {
            let data =  Blockly.Arduino.valueToCode(this, 'data', Blockly.Arduino.ORDER_ATOMIC);
            data = data.replace(/'/g, '');
          
            Blockly.Arduino.definitions_['include_EXT_NRF24_BLOCK_1609320679915'] = ``;
            Blockly.Arduino.definitions_['define_EXT_NRF24_BLOCK_1609320679915'] = ``;
            Blockly.Arduino.definitions_['setup_EXT_NRF24_BLOCK_1609320679915'] = ``;
             return  `radio.write(&${data}, sizeof(${data}) );\r\n`;
        }
                    

                        
        Blockly.Arduino['EXT_NRF24_BLOCK_1609321402619'] = function(block)
        {
            let data = Blockly.Arduino.valueToCode(this, 'data', Blockly.Arduino.ORDER_ATOMIC).replace(/'/g, '"') ;
          
            Blockly.Arduino.definitions_['include_EXT_NRF24_BLOCK_1609321402619'] = ``;
            Blockly.Arduino.definitions_['define_EXT_NRF24_BLOCK_1609321402619'] = ``;
            Blockly.Arduino.definitions_['setup_EXT_NRF24_BLOCK_1609321402619'] = ``;
             return  `char value[] = ${data};\r\nradio.write(value, sizeof(value) );\r\n`;
        }
                    

                        
        Blockly.Arduino['EXT_NRF24_BLOCK_1609321496516'] = function(block)
        {
            let listen = this.getFieldValue('listen');
          
            Blockly.Arduino.definitions_['include_EXT_NRF24_BLOCK_1609321496516'] = ``;
            Blockly.Arduino.definitions_['define_EXT_NRF24_BLOCK_1609321496516'] = ``;
            Blockly.Arduino.definitions_['setup_EXT_NRF24_BLOCK_1609321496516'] = ``;
             return  `radio.${listen}Listening();\r\n`;
        }
                    

                        
        Blockly.Arduino['EXT_NRF24_BLOCK_1609321655089'] = function(block)
        {
            
          
            Blockly.Arduino.definitions_['include_EXT_NRF24_BLOCK_1609321655089'] = ``;
            Blockly.Arduino.definitions_['define_EXT_NRF24_BLOCK_1609321655089'] = ``;
            Blockly.Arduino.definitions_['setup_EXT_NRF24_BLOCK_1609321655089'] = ``;
             return  [`radio.available()`];
        }
                    

                        
        Blockly.Arduino['EXT_NRF24_BLOCK_1609321869457'] = function(block)
        {
            let number =  Blockly.Arduino.valueToCode(this, 'number', Blockly.Arduino.ORDER_ATOMIC);
          
            Blockly.Arduino.definitions_['include_EXT_NRF24_BLOCK_1609321869457'] = `\n#include "RF24.h"`;
            Blockly.Arduino.definitions_['define_EXT_NRF24_BLOCK_1609321869457'] = ``;
            Blockly.Arduino.definitions_['setup_EXT_NRF24_BLOCK_1609321869457'] = `radio.begin();\r\n  \r\n  radio.openReadingPipe(1,${number});`;
             return  `\r\n`;
        }
                    

                        
        Blockly.Arduino['EXT_NRF24_BLOCK_1609322024507'] = function(block)
        {
            let number =  Blockly.Arduino.valueToCode(this, 'text', Blockly.Arduino.ORDER_ATOMIC);
            //let value_genre = this.getFieldValue('GENRE');
            number = number.replace(/'/g, '');
          
            Blockly.Arduino.definitions_['include_EXT_NRF24_BLOCK_1609322024507'] = ``;
            Blockly.Arduino.definitions_['define_EXT_NRF24_BLOCK_1609322024507'] = ``;
            Blockly.Arduino.definitions_['setup_EXT_NRF24_BLOCK_1609322024507'] = ``;
             return  `radio.read(&${number}, sizeof(${number}) );\r\n`;
        }
                    

                        
        Blockly.Arduino['EXT_NRF24_BLOCK_1609322134790'] = function(block)
        {
            
          
            Blockly.Arduino.definitions_['include_EXT_NRF24_BLOCK_1609322134790'] = ``;
            Blockly.Arduino.definitions_['define_EXT_NRF24_BLOCK_1609322134790'] = `char aary[100]={0};\r\nString receiving(){\r\n    radio.read(aary, sizeof(aary) );\r\n    String data = aary;\r\n    return data;\r\n }`;
            Blockly.Arduino.definitions_['setup_EXT_NRF24_BLOCK_1609322134790'] = ``;
             return  [`receiving()`];
        }
                    

                        
        Blockly.Arduino['EXT_NRF24_BLOCK_1609322250671'] = function(block)
        {
            let speed = this.getFieldValue('speed');
          
            Blockly.Arduino.definitions_['include_EXT_NRF24_BLOCK_1609322250671'] = ``;
            Blockly.Arduino.definitions_['define_EXT_NRF24_BLOCK_1609322250671'] = ``;
            Blockly.Arduino.definitions_['setup_EXT_NRF24_BLOCK_1609322250671'] = `radio.setDataRate(RF24_${speed});`;
             return  `\r\n`;
        }
                    
            return Blockly;
            }

            module.exports = addArduinoCod ;

        